package com.lyx.rpc.codec;

import com.lyx.rpc.serialization.api.Serialization;
import com.lyx.rpc.serialization.jdk.JdkSerialization;
import com.lyx.rpc.spi.loader.ExtensionLoader;

/**
 * @Author by lyx
 * 实现编解码的接口，提供序列化和反序列化的默认方法
 */
public interface RpcCodec {
    default Serialization getSerialization(String serializationType) {
        return ExtensionLoader.getExtension(Serialization.class, serializationType);
    }
}
